import { CommonEnum } from "../Common/CommonEnum";

/**
 * 不同游戏专属枚举值
 */
export module GlobalEnum {
    export const Common = CommonEnum;

    /**各游戏自定义的全局变量名称 */
    export enum myGlobalDataType {
        /**关卡中的玩家角色脚本 */
        player,
        /**关卡中的所有敌人角色脚本 */
        enemies,
        /**关卡中所有参与碰撞的物体，{ [key:GlobalEnum.CollerType]: yyComponent[] } */
        levelCollItems,
        /**是否满级试用 */
        tryMaxCar,
    }

    /**UI类型，枚举值与对应UI预制件、脚本名称相同 */
    export enum UI {
        //首页
        lobby = "GameLobby",                    //首页
        shop = "ShopUI",                        //商城界面
        chooseLevel = "ChooseLevelUI",          //关卡选择页面 
        //通用
        configSetting = "ConfigSettingUI",      //设置面板
        playerAssetBar = "PlayerAssetBar",      //玩家资产信息条
        getPower = "GetPowerUI",                //获取体力界面
        tipPower = "TipPowerUI",                //体力不足提示界面
        getGold = "GetGoldUI",                  //看视频获取金币界面
        //关卡中
        levelInfo = "LevelInfoUI",              //关卡信息
        levelController = "LevelController",    //关卡操作面板
        pauseLevel = "PauseLevelUI",            //关卡暂停面板
        trySkin = "TrySkinUI",                  //皮肤试用界面
        levelTeach = "TeachAnim",               //关卡教学界面
        match = "MatchUI",                      //角色匹配界面
        //结算页
        awardUI = "AwardUI",                    //奖励领取界面
        winUI = "WinUI",                        //胜利界面
        loseUI = "LoseUI",                      //失败界面
        resurgence = "ResurgenceUI",            //复活界面
        //砸蛋页
        touchBanner1 = "TouchBannerUI1",        //砸蛋页面
        touchBanner2 = "TouchBannerUI2",        //砸蛋页面
        touchBanner3 = "TouchBannerUI3",        //砸蛋页面
        //互推页
        littlePage = "Recommend_littlePage",    //小全导页
        middlePage = "Recommend_middlePage",    //中全导页
        bigPage = "Recommend_bigPage",          //大全导页
        recommendDialog = "RecommendDialog",    //互推弹窗
        //抽奖
        spin = "SpinUI",
        //签到
        signUI = 'SignUI',
        //车辆满级试用界面
        tryMaxCar = "TryMaxCarUI",
    }

    /**游戏数据类型 */
    export enum GameDataType {
        /**关卡数据 */
        levelData = "LevelData",
        playerSkin = "PlayerSkin",
        /**碰撞体数据 */
        CollItemData = "CollItemData",
        /**车辆属性 */
        CarData = "CarData",
    }
    /**商店中商品项的类型 */
    export enum GoodsType {
        /**主角皮肤 */
        playerSkin = "PlayerSkin",
    }

    /**音效文件 */
    export enum AudioClip {
        clickBtn = "ClickBtn",
        win = "Win",
        lose = "Lose",
        BGM = "BGM4",
        BGM2 = "BGM4",
        BGMLobby = "lobby",
        caiDai = "caidai2",

        //关卡数字变化动画音效
        lvChange = "lvAudio",

        gold = 'getGold',
        coins = 'coins',
        reward = "Reward",
        collBarrier = "zhuangji2",
        //抽奖音效
        spin = "wheelSpin",
        //抽中皮肤
        getSkin = "getSkin",

        /**变换车辆 */
        changeCar = "changeCar",
        /**撞毁障碍物 */
        breakBarrier = "zhuangji2",
        /**拾取零件 */
        getCarPart = "getPart2",


    }

    /**游戏所处流程 */
    export enum DirectState {
        lobby,
        level,

    }

    export enum VideoName {

    }
    /**关卡状态 */
    export enum LevelState {
        inited = 1,     //关卡已初始化完成，但还未开始游戏
        playing,        //关卡进行中
        win,            //玩家已胜利
        lose,           //玩家已失败
        lobby,          //显示首页中
        playerEntering, //玩家登场动画
        playerDead,     //玩家失败死亡动画
        fighting,       //战斗中
        waitTrySkin,    //等待玩家选择要试用的皮肤
        moveToScoreLine,
        moveOnScoreRoad,
    }
    /**关卡中相机状态 */
    export enum LevelCameraState {
        follow,
    }

    /**操作按键类型 */
    export enum KeyCode {
        left = 0,
        right,
        up,
        down,

        /**仅用作获取按键类型个数 */
        count,
    }

    /**属性变化标记 */
    export enum DirtyType {
        none = 0,
        /**坐标变化 */
        pos = (1 << 0),
        /**角度 */
        angle = (1 << 1),
        /**缩放 */
        scale = (1 << 2),
        /**自定义的碰撞范围 */
        aabb = (1 << 3),
        /**移动速度 */
        speed = (1 << 4),

        /**全部变化了，需要彻底更新 */
        all = 0xffffffff,
    }

    /**角色所处状态 */
    export enum RoleState {
        stand,
        move,
        /**在恶劣地形上行驶 */
        moveOnBadTerrain,
        moveToScoreLine,
        moveOnScoreRoad,
        //ai:转向
        rotateToColler,
        //ai:随便前进
        forward,
        //ai:终点路段随便走一下
        endRoad,
        /**胜利后的得瑟过程 */
        win,
    }

    /**可碰撞物体类型 */
    export enum CollerType {
        /**车辆零件 */
        carPart,
        /**金币 */
        gold,
        /**障碍物组 */
        barrierGroup,
        /**地形 */
        terrain,
        /**车辆变形的面 */
        changeCarQuad,
    }

    /**缓动曲线类型 */
    export enum EaseType {
        line,
        easeIn,
        easeOut,
        easeInOut,
        easeOutIn,
        sinIn,
        sinOut,
        sinInOut,
        sinOutIn,

    };

    /**路段形状类型 */
    export enum PathType {
        /**直线 */
        LL = "ll",
        /**侧视水平直线，俯视圆弧 */
        LC = "lc",
        /**侧视圆弧，俯视直线 */
        CL = "cl",

    }

    /**不同车辆对应的人物动作 */
    export enum RoleAnimName {
        stand = "SK_Player_01|Idle",
        car1_0 = "SK_Player_01|run",
        car1_1 = "SK_Player_01|car1_1",
        car1_2 = "SK_Player_01|car1_2",
        car1_3 = "SK_Player_01|car1_3",
        car2_1 = "SK_Player_01|car2_1",
        car2_2 = "SK_Player_01|car23",
        car2_3 = "SK_Player_01|car23",
        car3_1 = "SK_Player_01|car23",
        car3_2 = "SK_Player_01|car23",
        car3_3 = "SK_Player_01|car23",
    }

}
